<?php
/*
Module Group: text
Module Group Name: 文本
Description: 这是一个用来处理文本信息的插件
Version: 1.0
Display: 0
Iconurl: http://www.happyidea.com.cn/resource/wx_icon/text.png
Author: snaill
Modules: text
*/
class textModule extends Module {
	public function run($message, $material, $userStatus) {
		Log::write('Enter function textModule');
		
		$materialObj = simplexml_load_string($material->xml,
				'SimpleXMLElement', LIBXML_NOCDATA);
		
		$rm = $message->reply(message_type_text);
		$rm->content = (String)$materialObj->content;
		if(!empty($material->accessTag) && !empty($message->fromUserName)){	
			 setAccessTags($material->accessTag,$message->fromUserName,module_handle_text, $message->id);
		}
		return $rm;
	}

}

$module = new textModule();
Module::addModule($module);